Skip to content

Conversation

@mrz1836
Copy link
Collaborator

@mrz1836 mrz1836 commented Oct 9, 2025

What Changed

  • Added a shared constant for the repeated "expected size to be 4" assertion message in subtree_test.go.
  • Renamed subtree test functions to comply with Go's testing naming conventions by removing underscores and ensuring uniqueness.

Why It Was Necessary

  • Deduplicating the assertion message resolves the goconst warning around repeated literals and simplifies future updates.
  • Renaming the affected tests eliminates lint failures triggered by the repository's naming rules while avoiding duplicate declarations.

Testing Performed

  • go test ./...
  • golangci-lint run (fails in this environment because the configured linters arangolint, embeddedstructfieldcheck, and wsl_v5 are not recognized by the installed golangci-lint build)

Impact / Risk

  • No functional code changes; test-only updates.
  • Low risk of regressions since production code is untouched.
  • Assigning reviewer: @mrz1836

https://chatgpt.com/codex/tasks/task_e_68e8488070648321bc47c770e6794d68

Copilot AI review requested due to automatic review settings October 9, 2025 23:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves test code maintainability by normalizing test function names and eliminating code duplication in subtree tests.

  • Added a shared constant expectedSizeFourMessage to replace repeated "expected size to be 4" assertion messages
  • Renamed test functions to follow Go naming conventions by removing underscores
  • Replaced all hardcoded error message strings with the new constant

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 10, 2025 00:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
34.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@mrz1836 mrz1836 merged commit cbf9225 into master Oct 10, 2025
8 of 9 checks passed
@github-actions github-actions bot deleted the feat/fix-issues-and-run-linter branch October 10, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants